home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_3.5 / Documentation / Autodocs / bitmap_ic.doc < prev    next >
Encoding:
Text File  |  1999-10-29  |  6.5 KB  |  195 lines

  1. TABLE OF CONTENTS
  2.  
  3. bitmap_ic/--datasheet--
  4. bitmap_ic/BITMAP_GetClass
  5. bitmap_id/--datasheet--                             bitmap_ic/--datasheet--
  6.  
  7.     NAME
  8.         bitmap_ic -- Create image object using datatypes
  9.  
  10.     SUPERCLASS
  11.         imageclass
  12.  
  13.     REQUIRES
  14.         None.
  15.  
  16.     DESCRIPTION
  17.         This image class can create an image given the name of a source
  18.         file. It uses the datatypes system to create a bitmap used for
  19.         rendering the image. Bitmap supports drawing itself in a selected
  20.         state, and supports transparent images provided that the datatype
  21.         supports transparency.
  22.  
  23.         Instead of a source file name, a ready-to-use bitmap can be passed
  24.         with OM_NEW.
  25.         
  26.     METHODS
  27.         OM_NEW -- Create the bitmap image.  Passed to superclass, then OM_SET.
  28.  
  29.         OM_GET -- Get object attributes.  Passed to superclass first.
  30.  
  31.         OM_SET -- Set object attributes.  Passed to superclass first.
  32.  
  33.         OM_UPDATE -- Set object notification attributes.  Passed to
  34.             superclassfirst.
  35.  
  36.         IM_DRAW -- Renders the image.  Overrides the superclass.
  37.  
  38.         All other methods are passed to the superclass, including OM_DISPOSE.
  39.  
  40.     ATTRIBUTES
  41.         IA_TopEdge (WORD)
  42.         IA_LeftEdge (WORD)
  43.         IA_Width (WORD)
  44.         IA_Height (WORD)
  45.             Set position and size of the image. If given, these must be
  46.             greater then or equal to the maximum dimensions of the bitmaps
  47.             used.
  48.  
  49.             If the image size is larger than one of the bitmap sizes, the
  50.             bitmap will be drawn centered within in the image. The area 
  51.             surrounding the bitmap is NOT erased!
  52.  
  53.             Defaults to the maximum of the dimensions of the normal and
  54.             selected bitmaps.
  55.  
  56.             Applicability is (OM_NEW, OM_SET, OM_GET)
  57.  
  58.         BITMAP_SourceFile (STRPTR)
  59.             Source file name of the image file to create the bitmap from,
  60.             using the datatypes system.
  61.  
  62.             Applicability is (OM_NEW, OM_GET)
  63.  
  64.         BITMAP_Screen (struct Screen *)
  65.             Pointer to the screen to use the image on. This attribute MUST
  66.             be provided when creating an object of this class using the
  67.             datatypes system.
  68.  
  69.             Applicability is (OM_NEW, OM_GET)
  70.  
  71.         BITMAP_Precision (ULONG)
  72.             Precision to use when obtaining colors. See the PRECISION_
  73.             defines in <graphics/view.h>
  74.  
  75.             Defaults to PRECISION_ICON.
  76.  
  77.             Applicability is (OM_NEW, OM_GET)
  78.  
  79.         BITMAP_Masking (BOOL)
  80.             If set to TRUE, the image will be drawn using a transparent
  81.             mask if the image source contains a transparent color.
  82.  
  83.             Defaults to FALSE.
  84.  
  85.             Applicability is (OM_NEW, OM_GET)
  86.  
  87.         BITMAP_BitMap (struct BitMap *)
  88.             Instead of letting the class create the bitmap using datatypes,
  89.             you can create your own bitmap and pass it to the class.
  90.             If you supply your own bitmap, you MUST set BITMAP_Width
  91.             and BITMAP_Height too.
  92.             Either BITMAP_SourceFile or BITMAP_BitMap must be given.
  93.  
  94.             Applicability is (OM_NEW, OM_GET)
  95.  
  96.         BITMAP_Width (LONG)
  97.         BITMAP_Height (LONG)
  98.             Set the dimensions of your own bitmap passed with
  99.             BITMAP_BitMap, or get the dimensions of the bitmap created
  100.             by the datatype.
  101.  
  102.             Applicability is (OM_NEW, OM_GET)
  103.  
  104.         BITMAP_MaskPlane (APTR)
  105.             A mask plane. Only set this if you supply your own bitmap
  106.             with BITMAP_BitMap.
  107.             The mask plane will only be used if BITMAP_Masking is TRUE.
  108.  
  109.             Defaults to NULL.
  110.  
  111.             Applicability is (OM_NEW, OM_GET)
  112.  
  113.         BITMAP_SelectSourceFile (STRPTR)
  114.             Source file name of the selected state image to create the
  115.             bitmap from, using the datatypes system.
  116.  
  117.             Applicability is (OM_NEW, OM_GET)
  118.  
  119.         BITMAP_SelectBitMap (struct BitMap *)
  120.             Your own bitmap to use for the selected state.
  121.             If you supply your own bitmap, you MUST set BITMAP_SelectWidth
  122.             and BITMAP_SelectHeight too.
  123.  
  124.             Applicability is (OM_NEW, OM_GET)
  125.  
  126.         BITMAP_SelectWidth (LONG)
  127.         BITMAP_SelectHeight (LONG)
  128.             Set the dimensions of your own selected statebitmap passed
  129.             with BITMAP_SelectBitMap, or get the dimensions of the selected
  130.             state bitmap created by the datatype.
  131.  
  132.             Applicability is (OM_NEW, OM_GET)
  133.  
  134.         BITMAP_SelectMaskPlane (APTR)
  135.             A mask plane for the selected state bitmap. Only set this if
  136.             you supply your own bitmap with BITMAP_SelectBitMap.
  137.             The mask plane will only be used if BITMAP_Masking is TRUE.
  138.  
  139.             Defaults to NULL.
  140.  
  141.             Applicability is (OM_NEW, OM_GET)
  142.  
  143.         BITMAP_OffsetX (LONG)
  144.         BITMAP_OffsetY (LONG)
  145.             Together with BITMAP_BitMap, BITMAP_Width and BITMAP_Height
  146.             these attributes determine which part of the bitmap to use
  147.             for the image.
  148.             These attributes will be ignored if the bitmap was created
  149.             by the class using datatypes.
  150.  
  151.             Defaults to 0.
  152.  
  153.             Applicability is (OM_NEW, OM_GET)
  154.  
  155.         BITMAP_SelectOffsetX (LONG)
  156.         BITMAP_SelectOffsetY (LONG)
  157.             Together with BITMAP_SelectBitMap, BITMAP_SelectWidth and
  158.             BITMAP_SelectHeight these attributes determine which part
  159.             of the bitmap to use for the selected state image.
  160.             These attributes will be ignored if the bitmap was created
  161.             by the class using datatypes.
  162.  
  163.             Defaults to 0.
  164.  
  165.             Applicability is (OM_NEW, OM_GET)
  166. bitmap_ic/BITMAP_GetClass                         bitmap_ic/BITMAP_GetClass
  167.  
  168.     NAME
  169.         BITMAP_GetClass -- Gets the pointer to the bitmap class.
  170.  
  171.     SYNOPSIS
  172.         bitmap_class = BITMAP_GetClass();
  173.         D0
  174.  
  175.         Class * BITMAP_GetClass(VOID);
  176.  
  177.     FUNCTION
  178.         Obtains the pointer to the BitMap image class for use with
  179.         NewObject().  This function always returns a valid pointer so
  180.         you do not need to check it.  The reason is that if the library
  181.         opens fine, then the pointer returned is already setup.  (Of course
  182.         this implies that if opening the library fails, you shouldn't be
  183.         calling this.)
  184.  
  185.         Note that this function does not create the class, that is done
  186.         when the class library is opened.
  187.  
  188.     INPUTS
  189.         Nothing.
  190.  
  191.     RESULT
  192.         bitmap_class - Pointer to the BitMap image class.
  193.  
  194.     SEE ALSO
  195.